package com.guoqing.redis.practice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author guoQ.z
 * @date 2021/1/4 14:23
 * TODO
 */
@RestController
@RequestMapping("/practice")
public class PracticeController {
    @Autowired
    RedisHashService redisHashService;

    @GetMapping("/hashPut")
    public void hashPut(String key, String fieldKey, String fieldValue) {
        redisHashService.testHashPut(key, fieldKey, fieldValue);
    }

    @GetMapping("/hashGet")
    public void hashGet(String key, String fieldKey) {
        String s = redisHashService.testHashGet(key, fieldKey);
        System.out.println(s);
    }

}
